import request from '@/utils/request'

export function createApplyOrder(applyForOrderVo) {
  return request({
    url: '/admin/leaves/apply-for-order/createApplyOrder',
    method: 'post',
    data: applyForOrderVo
  })
}

export function deleteApplyOrder(id) {
  return request({
    url: `/admin/leaves/apply-for-order/deleteApplyOrder/${id}`,
    method: 'delete'
  })
}

export function updateApplyOrder(applyForOrderVo) {
  return request({
    url: '/admin/leaves/apply-for-order/updateApplyOrder',
    method: 'put',
    data: applyForOrderVo
  })
}

export function getApplyOrderList(searchObj) {
  return request({
    url: '/admin/leaves/apply-for-order/getApplyOrderList',
    method: 'post',
    data: searchObj
  })
}

export function auditApplyOrder(auditOrderVo) {
  return request({
    url: '/admin/leaves/apply-for-order/auditApplyOrder',
    method: 'post',
    data: auditOrderVo
  })
}
